<?php
include("include/config.inc.php");
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>订戏会 - 艺术的旗舰，带您走进剧场！</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=9,Chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!-- css -->
<link rel="stylesheet" type="text/css" href="css/frameCss/swiper.css"/>
<link rel="stylesheet" type="text/css" href="css/public.css"/>
<link rel="stylesheet" type="text/css" href="css/index.css">
</head>
<body>

<header></header>


<div id="container-wrapper">

	<div id="container">
		<!--轮播图-->
		<div class="banner swiper-container">
	        <div class="swiper-wrapper">
	            <div class="swiper-slide"><a href="#"><img src="images/slide/slide_01.png" height="100%" width="100%"/></a></div>
	            <div class="swiper-slide"><a href="#"><img src="images/slide/slide_02.png" height="100%" width="100%"/></a></div>
	        </div>
	        <div class="swiper-pagination"></div>
	    </div>
	</div>
</div>
		
<div id="nav-fixed">
	<a href="list.php" class="nav-item"><i class="icon-nav nav1"></i>演出</a>
	<a href="store/troupe.php" class="nav-item"><i class="icon-nav nav2"></i>剧团</a>
	<a href="store/pq.php" class="nav-item"><i class="icon-nav nav3"></i>排期</a>
	<a href="store/newslist.php" class="nav-item"><i class="icon-nav nav4"></i>动态</a>
	<a href="agent/index.php" class="nav-item"><i class="icon-nav nav5"></i>经纪人</a>	
</div>

<div id="listhot">
<?php
$result = $db->query("select * FROM ".tableprefix."goods where goods_state=1 and goods_commend=1 ORDER BY goods_id DESC LIMIT 0,3");
while($row = $db->fetch_array($result))
{
?>
	<a href="goods.php?id=<?php echo $row["goods_id"];?>">
	<div class="listhot-item">
		<div class="listhot-img"><img src="<?php echo $row["goods_image"];?>"></div>
		<div class="listhot-title"><?php echo $row["goods_name"];?></div>
	</div>
	</a>
<?php
}
?>
</div>

<div id="listcard">
	<h1>热门演出<a href="list.php">查看更多</a></h1>
	<ul>
<?php
$result = $db->query("select * FROM ".tableprefix."goods where goods_state=1 and goods_commend=1 ORDER BY goods_id DESC LIMIT 3,10");
while($row = $db->fetch_array($result))
{
?>
		<li><a href="goods.php?id=<?php echo $row["goods_id"];?>"><div><img src="http://gd.wycn.com/data/upload/apps/store/goods/<?php echo $row["store_id"];?>/<?php echo $row["goods_image"];?>"><span><?php echo $row["goods_name"];?></span></div></a></li>
<?php
}
?>
	</ul>
</div>

<div id="listcard">
	<h1>活跃剧团<a href="store/troupe.php">查看更多</a></h1>
	<ul>
<?php
$result = $db->query("select * FROM ".tableprefix."store where store_state=1 and store_label<>'' ORDER BY store_id DESC LIMIT 0,10");
while($row = $db->fetch_array($result))
{
?>
		<li><a href="store/index.php?id=<?php echo $row["store_id"];?>"><div><img src="<?php echo $row["store_label"];?>"><span><?php echo $row["store_name"];?></span></div></a></li>
<?php
}
?>
	</ul>
</div>

<div id="titlecard">
	<h1>剧团动态<a href="store/newslist.php">查看更多</a></h1>
	<ul>
<?php
$result = $db->query("select * FROM ".tableprefix."news where flag='T' ORDER BY id DESC LIMIT 0,10");
while($row = $db->fetch_array($result))
{
$i==0;
?>
		<a href="store/shownews.php?id=<?php echo $row["id"];?>"><li<?php if($i==10){echo " style='border-bottom:none;'";}?>><?php echo $row["title"];?></li></a>
<?php
$i++;
}
?>
	</ul>
</div>

<div id="bottom"></div>

<footer id="bar-fixed">
	<a href="index.php" class="tab-item active"><i class="icon-tabbar bar-home2"></i>首页</a>
	<a href="category.php" class="tab-item"><i class="icon-tabbar bar-message"></i>分类</a>
	<a href="publish/" class="tab-item"><i class="icon-tabbar bar-publish"></i>发布</a>	
	<a href="user/" class="tab-item"><i class="icon-tabbar bar-user"></i>我</a>
</footer>
<!-- js -->
<script src="js/frameJS/jquery-2.1.0.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/clientwidth.js" type="text/javascript"></script>
<script src="js/frameJS/iscroll/build/iscroll.js" type="text/javascript" charset="utf-8"></script>
<script src="js/frameJS/swiper.min.js" type="text/javascript" charset="utf-8"></script>
<script>
	$(function(){
		
		if (document.body.clientWidth > 640) {
			$('body').css({
				width: 640,
				margin: '0 auto',
			});
		}
		
		//引用iScroll并调用
		function loaded(){
			var myScroll = new IScroll('#container-wrapper', {
				scrollbars: true,
				mouseWheel: true,
				interactiveScrollbars: true,
				shrinkScrollbars: 'scale',
				fadeScrollbars: true,
				//click:true防止点击事件或a标签失效
				click:true,
			});
		}
		window.setTimeout(loaded,100);
		
		//头部轮播图
		var swiper = new Swiper('.swiper-container', {
	        pagination: '.swiper-pagination',
	        paginationClickable: true,
	        autoplay:3000
	    });
	})

</script>
</body>
</html>